package com.tmt.im.common.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.tmt.im.common.enums.ChatSessionType;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;

/**
 * 新聊天群组申请信息
 *
 * @Description TODO
 * @Author wuyi
 * @Date 2024/8/6 19:50
 * @Version 1.0
 **/
@Getter
@Setter
@Tag(name = "NewChatSessionVo", description = "新群组创建请求对象")
public class NewChatSessionVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 6877933291926957711L;

    /**
     * 群聊名称。双人会话类型时，名称默认为对方的昵称。
     */
    @Schema(requiredMode = REQUIRED, description = "群组名称")
    @NotNull(message = "群组名称不能为null")
    @NotBlank(message = "群组名称不能为空串")
    @JsonProperty("groupName")
    private String name;

    /**
     * 被邀请的用户ID列表
     */
    @Schema(requiredMode = REQUIRED, description = "被邀请的用户ID列表")
    @NotNull(message = "被邀请用户ID列表不能为null")
    @NotEmpty(message = "被邀请用户ID列表不能为空列表")
    @JsonProperty("members")
    private List<Long> invitedIds = new ArrayList<>();

    /**
     * 邀请语。
     */
    @Schema(requiredMode = REQUIRED, description = "群组默认邀请语")
    @Nullable
    private String inviteMsg;

    @Schema(requiredMode = NOT_REQUIRED, description = "群公告")
    @Nullable
    private String announcement;

    @Schema(requiredMode = NOT_REQUIRED, description = "群描述")
    @Nullable
    private String intro;

}
